package com.dk.service.impl;

import com.dk.mapper.TabCategoryMapper;
import com.dk.pojo.TabCategory;
import com.dk.service.TabCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TabCategoryServiceImpl implements TabCategoryService {

    @Autowired
    private TabCategoryMapper tabCategoryMapper;

    @Override
    public List<TabCategory> getInfo() {
        return tabCategoryMapper.selectByExample(null);
    }

    @Override
    public int insert(TabCategory tabCategory) {
        return tabCategoryMapper.insert(tabCategory);
    }

    @Override
    public int updateInfo(TabCategory tabCategory) {
        return tabCategoryMapper.updateByPrimaryKey(tabCategory);
    }

    @Override
    public int deleteById(Integer cid) {
        return tabCategoryMapper.deleteByPrimaryKey(cid);
    }

    @Override
    public TabCategory selectById(Integer cid) {
        return tabCategoryMapper.selectByPrimaryKey(cid);
    }
}
